import request from '@/utils/request'

// 根据排课查询对象获取排课信息
export function getSchedule(queryInfo) {
  return request({
    url: '/admin/expschedule/schedule/getSchedule',
    method: 'POST',
    data: queryInfo
  })
}

// 根据课程 id 删除排课信息
export function deleteSchedule(id) {
  return request({
    url: `/admin/expschedule/schedule/remove/${id}`,
    method: 'DELETE'
  })
}

// 添加排课信息
export function addSchedule(form) {
  return request({
    url: '/admin/expschedule/schedule/save',
    method: 'POST',
    data: form
  })
}

// 根据排课 id 查询排课信息
export function getScheduleById(id) {
  return request({
    url: `/admin/expschedule/schedule/getById/${id}`,
    method: 'GET'
  })
}

// 更新排课信息
export function updateSchedule(form) {
  return request({
    url: '/admin/expschedule/schedule/update',
    method: 'PUT',
    data: form
  })
}
